#ifndef _SE_KEYBOARDBUTTONS_
#define _SE_KEYBOARDBUTTONS_

#include "Core/Logger.h"

namespace SE
{
	// Form glfw3.h
	enum class KeyboardButton
	{
		KEYB_SPACE			= 32,
		KEYB_APOSTROPHE		= 39, /* ' */
		KEYB_COMMA			= 44, /* , */
		KEYB_MINUS			= 45, /* - */
		KEYB_PERIOD			= 46, /* . */
		KEYB_SLASH			= 47, /* / */
		KEYB_0				= 48,
		KEYB_1				= 49,
		KEYB_2				= 50,
		KEYB_3				= 51,
		KEYB_4				= 52,
		KEYB_5				= 53,
		KEYB_6				= 54,
		KEYB_7				= 55,
		KEYB_8				= 56,
		KEYB_9				= 57,
		KEYB_SEMICOLON		= 59, /* ; */
		KEYB_EQUAL			= 61, /* = */
		KEYB_A				= 65,
		KEYB_B				= 66,
		KEYB_C				= 67,
		KEYB_D				= 68,
		KEYB_E				= 69,
		KEYB_F				= 70,
		KEYB_G				= 71,
		KEYB_H				= 72,
		KEYB_I				= 73,
		KEYB_J				= 74,
		KEYB_K				= 75,
		KEYB_L				= 76,
		KEYB_M				= 77,
		KEYB_N				= 78,
		KEYB_O				= 79,
		KEYB_P				= 80,
		KEYB_Q				= 81,
		KEYB_R				= 82,
		KEYB_S				= 83,
		KEYB_T				= 84,
		KEYB_U				= 85,
		KEYB_V				= 86,
		KEYB_W				= 87,
		KEYB_X				= 88,
		KEYB_Y				= 89,
		KEYB_Z				= 90,
		KEYB_LEFT_BRACKET	= 91, /* [ */
		KEYB_BACKSLASH		= 92, /* \ */
		KEYB_RIGHT_BRACKET	= 93, /* ] */
		KEYB_GRAVE_ACCENT	= 96, /* ` */
		KEYB_WORLD_1		= 161, /* non-US #1 */
		KEYB_WORLD_2		= 162, /* non-US #2 */
		/* Function keys */
		KEYB_ESCAPE			= 256,
		KEYB_ENTER			= 257,
		KEYB_TAB			= 258,
		KEYB_BACKSPACE		= 259,
		KEYB_INSERT			= 260,
		KEYB_DELETE			= 261,
		KEYB_RIGHT			= 262,
		KEYB_LEFT			= 263,
		KEYB_DOWN			= 264,
		KEYB_UP				= 265,
		KEYB_PAGE_UP		= 266,
		KEYB_PAGE_DOWN		= 267,
		KEYB_HOME			= 268,
		KEYB_END			= 269,
		KEYB_CAPS_LOCK		= 280,
		KEYB_SCROLL_LOCK	= 281,
		KEYB_NUM_LOCK		= 282,
		KEYB_PRINT_SCREEN	= 283,
		KEYB_PAUSE			= 284,
		KEYB_F1				= 290,
		KEYB_F2				= 291,
		KEYB_F3				= 292,
		KEYB_F4				= 293,
		KEYB_F5				= 294,
		KEYB_F6				= 295,
		KEYB_F7				= 296,
		KEYB_F8				= 297,
		KEYB_F9				= 298,
		KEYB_F10			= 299,
		KEYB_F11			= 300,
		KEYB_F12			= 301,
		KEYB_F13			= 302,
		KEYB_F14			= 303,
		KEYB_F15			= 304,
		KEYB_F16			= 305,
		KEYB_F17			= 306,
		KEYB_F18			= 307,
		KEYB_F19			= 308,
		KEYB_F20			= 309,
		KEYB_F21			= 310,
		KEYB_F22			= 311,
		KEYB_F23			= 312,
		KEYB_F24			= 313,
		KEYB_F25			= 314,
		KEYB_KP_0			= 320,
		KEYB_KP_1			= 321,
		KEYB_KP_2			= 322,
		KEYB_KP_3			= 323,
		KEYB_KP_4			= 324,
		KEYB_KP_5			= 325,
		KEYB_KP_6			= 326,
		KEYB_KP_7			= 327,
		KEYB_KP_8			= 328,
		KEYB_KP_9			= 329,
		KEYB_KP_DECIMAL		= 330,
		KEYB_KP_DIVIDE		= 331,
		KEYB_KP_MULTIPLY	= 332,
		KEYB_KP_SUBTRACT	= 333,
		KEYB_KP_ADD			= 334,
		KEYB_KP_ENTER		= 335,
		KEYB_KP_EQUAL		= 336,
		KEYB_LEFT_SHIFT		= 340,
		KEYB_LEFT_CONTROL	= 341,
		KEYB_LEFT_ALT		= 342,
		KEYB_LEFT_SUPER		= 343,
		KEYB_RIGHT_SHIFT	= 344,
		KEYB_RIGHT_CONTROL	= 345,
		KEYB_RIGHT_ALT		= 346,
		KEYB_RIGHT_SUPER	= 347,
		KEYB_MENU			= 348
	};

	inline String ToString(const KeyboardButton button)
	{
		switch (button)
		{
			default: LOG_WARN("Unknown keyboard button: {}", I32(button)); return "";
			case KeyboardButton::KEYB_SPACE: return "Keyb_Space";
			case KeyboardButton::KEYB_APOSTROPHE: return "Keyb_Apostrophe";
			case KeyboardButton::KEYB_COMMA: return "Keyb_Command";
			case KeyboardButton::KEYB_MINUS: return "Keyb_Minus";
			case KeyboardButton::KEYB_PERIOD: return "Keyb_Period";
			case KeyboardButton::KEYB_SLASH: return "Keyb_Slash";
			case KeyboardButton::KEYB_0: return "Keyb_0";
			case KeyboardButton::KEYB_1: return "Keyb_1";
			case KeyboardButton::KEYB_2: return "Keyb_2";
			case KeyboardButton::KEYB_3: return "Keyb_3";
			case KeyboardButton::KEYB_4: return "Keyb_4";
			case KeyboardButton::KEYB_5: return "Keyb_5";
			case KeyboardButton::KEYB_6: return "Keyb_6";
			case KeyboardButton::KEYB_7: return "Keyb_7";
			case KeyboardButton::KEYB_8: return "Keyb_8";
			case KeyboardButton::KEYB_9: return "Keyb_9";
			case KeyboardButton::KEYB_SEMICOLON: return "Keyb_Semicolon";
			case KeyboardButton::KEYB_EQUAL: return "Keyb_Equal";
			case KeyboardButton::KEYB_A: return "Keyb_A";
			case KeyboardButton::KEYB_B: return "Keyb_B";
			case KeyboardButton::KEYB_C: return "Keyb_C";
			case KeyboardButton::KEYB_D: return "Keyb_D";
			case KeyboardButton::KEYB_E: return "Keyb_E";
			case KeyboardButton::KEYB_F: return "Keyb_F";
			case KeyboardButton::KEYB_G: return "Keyb_G";
			case KeyboardButton::KEYB_H: return "Keyb_H";
			case KeyboardButton::KEYB_I: return "Keyb_I";
			case KeyboardButton::KEYB_J: return "Keyb_J";
			case KeyboardButton::KEYB_K: return "Keyb_K";
			case KeyboardButton::KEYB_L: return "Keyb_L";
			case KeyboardButton::KEYB_M: return "Keyb_M";
			case KeyboardButton::KEYB_N: return "Keyb_N";
			case KeyboardButton::KEYB_O: return "Keyb_O";
			case KeyboardButton::KEYB_P: return "Keyb_P";
			case KeyboardButton::KEYB_Q: return "Keyb_Q";
			case KeyboardButton::KEYB_R: return "Keyb_R";
			case KeyboardButton::KEYB_S: return "Keyb_S";
			case KeyboardButton::KEYB_T: return "Keyb_T";
			case KeyboardButton::KEYB_U: return "Keyb_U";
			case KeyboardButton::KEYB_V: return "Keyb_V";
			case KeyboardButton::KEYB_W: return "Keyb_W";
			case KeyboardButton::KEYB_X: return "Keyb_X";
			case KeyboardButton::KEYB_Y: return "Keyb_Y";
			case KeyboardButton::KEYB_Z: return "Keyb_Z";
			case KeyboardButton::KEYB_LEFT_BRACKET: return "Keyb_Left_Bracket";
			case KeyboardButton::KEYB_BACKSLASH: return "Keyb_Backslash";
			case KeyboardButton::KEYB_RIGHT_BRACKET: return "Keyb_Right_Bracket";
			case KeyboardButton::KEYB_GRAVE_ACCENT: return "Keyb_Grave_Accept";
			case KeyboardButton::KEYB_WORLD_1: return "Keyb_World_1";
			case KeyboardButton::KEYB_WORLD_2: return "Keyb_World_2";
			case KeyboardButton::KEYB_ESCAPE: return "Keyb_Escape";
			case KeyboardButton::KEYB_ENTER: return "Keyb_Enter";
			case KeyboardButton::KEYB_TAB: return "Keyb_Tab";
			case KeyboardButton::KEYB_BACKSPACE: return "Keyb_Backspace";
			case KeyboardButton::KEYB_INSERT: return "Keyb_Insert";
			case KeyboardButton::KEYB_DELETE: return "Keyb_Delete";
			case KeyboardButton::KEYB_RIGHT: return "Keyb_Right";
			case KeyboardButton::KEYB_LEFT: return "Keyb_Left";
			case KeyboardButton::KEYB_DOWN: return "Keyb_Down";
			case KeyboardButton::KEYB_UP: return "Keyb_Up";
			case KeyboardButton::KEYB_PAGE_UP: return "Keyb_Page_Up";
			case KeyboardButton::KEYB_PAGE_DOWN: return "Keyb_Page_Down";
			case KeyboardButton::KEYB_HOME: return "Keyb_Home";
			case KeyboardButton::KEYB_END: return "Keyb_End";
			case KeyboardButton::KEYB_CAPS_LOCK: return "Keyb_Caps_Lock";
			case KeyboardButton::KEYB_SCROLL_LOCK: return "Keyb_Scroll_Lock";
			case KeyboardButton::KEYB_NUM_LOCK: return "Keyb_Num_Lock";
			case KeyboardButton::KEYB_PRINT_SCREEN: return "Keyb_Print_Screen";
			case KeyboardButton::KEYB_PAUSE: return "Keyb_Pause";
			case KeyboardButton::KEYB_F1: return "Keyb_F1";
			case KeyboardButton::KEYB_F2: return "Keyb_F2";
			case KeyboardButton::KEYB_F3: return "Keyb_F3";
			case KeyboardButton::KEYB_F4: return "Keyb_F4";
			case KeyboardButton::KEYB_F5: return "Keyb_F5";
			case KeyboardButton::KEYB_F6: return "Keyb_F6";
			case KeyboardButton::KEYB_F7: return "Keyb_F7";
			case KeyboardButton::KEYB_F8: return "Keyb_F8";
			case KeyboardButton::KEYB_F9: return "Keyb_F9";
			case KeyboardButton::KEYB_F10: return "Keyb_F10";
			case KeyboardButton::KEYB_F11: return "Keyb_F11";
			case KeyboardButton::KEYB_F12: return "Keyb_F12";
			case KeyboardButton::KEYB_F13: return "Keyb_F13";
			case KeyboardButton::KEYB_F14: return "Keyb_F14";
			case KeyboardButton::KEYB_F15: return "Keyb_F15";
			case KeyboardButton::KEYB_F16: return "Keyb_F16";
			case KeyboardButton::KEYB_F17: return "Keyb_F17";
			case KeyboardButton::KEYB_F18: return "Keyb_F18";
			case KeyboardButton::KEYB_F19: return "Keyb_F19";
			case KeyboardButton::KEYB_F20: return "Keyb_F20";
			case KeyboardButton::KEYB_F21: return "Keyb_F21";
			case KeyboardButton::KEYB_F22: return "Keyb_F22";
			case KeyboardButton::KEYB_F23: return "Keyb_F23";
			case KeyboardButton::KEYB_F24: return "Keyb_F24";
			case KeyboardButton::KEYB_F25: return "Keyb_F25";
			case KeyboardButton::KEYB_KP_0: return "Keyb_KP_0";
			case KeyboardButton::KEYB_KP_1: return "Keyb_KP_1";
			case KeyboardButton::KEYB_KP_2: return "Keyb_KP_2";
			case KeyboardButton::KEYB_KP_3: return "Keyb_KP_3";
			case KeyboardButton::KEYB_KP_4: return "Keyb_KP_4";
			case KeyboardButton::KEYB_KP_5: return "Keyb_KP_5";
			case KeyboardButton::KEYB_KP_6: return "Keyb_KP_6";
			case KeyboardButton::KEYB_KP_7: return "Keyb_KP_7";
			case KeyboardButton::KEYB_KP_8: return "Keyb_KP_8";
			case KeyboardButton::KEYB_KP_9: return "Keyb_KP_9";
			case KeyboardButton::KEYB_KP_DECIMAL: return "Keyb_KP_Decimal";
			case KeyboardButton::KEYB_KP_DIVIDE: return "Keyb_KP_Divide";
			case KeyboardButton::KEYB_KP_MULTIPLY: return "Keyb_KP_Multiply";
			case KeyboardButton::KEYB_KP_SUBTRACT: return "Keyb_KP_Subtract";
			case KeyboardButton::KEYB_KP_ADD: return "Keyb_KP_Add";
			case KeyboardButton::KEYB_KP_ENTER: return "Keyb_KP_Enter";
			case KeyboardButton::KEYB_KP_EQUAL: return "Keyb_KP_Equal";
			case KeyboardButton::KEYB_LEFT_SHIFT: return "Keyb_Left_Shift";
			case KeyboardButton::KEYB_LEFT_CONTROL: return "Keyb_Left_Control";
			case KeyboardButton::KEYB_LEFT_ALT: return "Keyb_Left_Alt";
			case KeyboardButton::KEYB_LEFT_SUPER: return "Keyb_Left_Super";
			case KeyboardButton::KEYB_RIGHT_SHIFT: return "Keyb_Right_Shift";
			case KeyboardButton::KEYB_RIGHT_CONTROL: return "Keyb_Right_Control";
			case KeyboardButton::KEYB_RIGHT_ALT: return "Keyb_Right_Alt";
			case KeyboardButton::KEYB_RIGHT_SUPER: return "Keyb_Right_Super";
			case KeyboardButton::KEYB_MENU: return "Keyb_Menu";
		}
	}
} // !namespace SE

#endif // !_SE_KEYBOARDBUTTONS_